﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Enterprise.UI.Web.Modules.CaiWuBu
{
    public partial class jscreate : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Enterprise.Service.Caiwubu.KHBService khbService = new Service.Caiwubu.KHBService();
                ddl_zbmc.DataSource = khbService.zbmc;
                ddl_zbmc.DataBind();
            }
        }

        protected void btn_create_Click(object sender, EventArgs e)
        {
            string nf = DateTime.Now.Year.ToString();
            string zbmc = "净利润";
            string dwmc = "SZK";
            if (!string.IsNullOrEmpty(tb_nf.Text))
            {
                nf = tb_nf.Text;
            }
            dwmc = ddl_dw.SelectedValue;
            zbmc = Server.UrlPathEncode(ddl_zbmc.SelectedValue);
            tb_preview.Text = "<a href='js.aspx?zbmc=" + zbmc + "&dwmc=" + dwmc + "&nf=" + nf + "&showtable="+ddl_showtable.SelectedValue  + "&width="+tb_width.Text+"&height="+tb_height.Text+"' target='"+DropDownList1.SelectedValue+"'>" + ddl_zbmc.SelectedValue + "</a>";
            tb_jsString.Text = "<a href='js.aspx?zbmc=" + zbmc + "&dwmc=" + dwmc + "&nf=" + nf + "&showtable=" + ddl_showtable.SelectedValue + "&width=" + tb_width.Text + "&height=" + tb_height.Text + "' target='" + DropDownList1.SelectedValue + "'>" + ddl_zbmc.SelectedValue + "</a>";
        }
    }
}